package mao.designmode.singleton;

public class Singleton5 {
    private static Singleton5 instance = null;
    private Singleton5(){}
    public static Singleton5 getInstance(){
        if (instance == null){
            try {
                //模拟初始化
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            instance = new Singleton5();
        }
        return instance;
    }
}
